package com.one.consumer.reserve.presenter;

import android.content.Context;

import com.one.common.model.http.callback.ObserverOnResultListener;
import com.one.common.presenter.BaseApiPresenter;
import com.one.common.view.base.BaseActivity;
import com.one.consumer.reserve.model.ReserveModel;
import com.one.consumer.reserve.model.bean.ReserveIconBean;
import com.one.consumer.reserve.ui.view.ReserveIconView;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/11/6 2:51 PM
 * description ：获取装修预约的图标
 **/
public class DEPresenter extends BaseApiPresenter<ReserveIconView, ReserveModel> {
    public DEPresenter(ReserveIconView mView, Context mContext) {
        super(mView, mContext, new ReserveModel((BaseActivity) mContext));
    }

    public void getImg(){
        mModel.getImg(new ObserverOnResultListener<ReserveIconBean>() {
            @Override
            public void onResult(ReserveIconBean s) {
                if(mView!=null && s!=null){
                    mView.setIcon(s);
                }
            }
        });
    }
}
